All Functions Used So Far, Week 7

aggregate

{stats}

Compute summary statistics of data subsets / by groups

levels

{base}

Get levels of a factor

library

{base}

Load an R package

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

recode_factor

{dplyr}

Recode factor values, changing the levels and their order

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

labs

{GGPLOT2}

Customise labels in GGPLOT2

ls

{base}

Return a vector of character strings giving the names of the objects in the specified environment

max

{base}

Get maximum of a vector

rm

{base}

Remove objects

factor

{base}

Create factor variables

summarise

{dplyr}

collapse the dataset to a summary statistic. Usually used with group_by()

arrange

{dplyr}

Sort values of data frame according to a variable/combination of variables

head

{utils}

Show first 5 rows of a data frame

cut

{base}

Convert Numeric to Factor

ungroup

{dplyr}

Resolve grouping created with “group_by”

seq

{base}

Create a sequence

factor

{base}

Create a factor

filter

{dplyr}

Filter out rows of a data frame according to logical vector

which.max

{base}

return index of the largest value in a vector

str

{utils}

Get the structure of an R object

order

{base}

Get indexes that will sort a vector

setwd

{base}

Set Working Directory

which.min

{base}

Return the index of the smallest value in a vector

length

{base}

Returns number of elements in an object

quantile

{stats}

Obtain empirical quantiles of a vector

ordered

{dplyr}

Create an ordered factor

View

{base}

View a data frame

summary

{base}

Obtain summary statistics or detailed regression output

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

select

{dplyr}

Select columns from a tibble/data frame

desc

{dplyr}

Arrange in descending order

min

{base}

Get minimum of a vector

hist

{graphics}

Plot a simple histogram

with

{base}

evaluate expression in the context of a data frame

slice

{dplyr}

Select rows by position

geom_histogram

{GGPLOT2}

Generates a histogram

median

{stats}

Get median of a vector

var

{stats}

Calculate variance

names

{base}

Get or set names of an object

c

{base}

Combine values/vectors into a vector

nrow

{base}

Get number of rows of a data frame

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

read_excel

{readxl}

Read an Excel file

sd

{stats}

Get standard deviation of a vector

mean

{base}

Get mean of a vector

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

install_rsthemes

{rsthemes}

Install the rsthemes collection of RStudio themes

mutate

{dplyr}

Create new variables

print

{base}

Print object to the console

ggplot

{GGPLOT2}

Create a ggplot graph

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

ifelse

{base}

Return a or b depending on the value of test

sum

{base}

Get sum of numeric values or a vector

install.packages

{utils}

Install R packages

range

{base}

Return range of values

boxplot

{graphics}

Plot a simple box plot

recode

{dplyr}

Recode a variable

plot

{graphics}

Generic function from base R to produce a plot

The end!